#pragma once


// LogCtrl
class Log : public std::wstring
{
public:
	enum Type
	{
		Info,
		Warning,
		Error,
	};

	explicit Log(Type type = Info)
	{
		switch (type)
		{
		case Info:
			append(L"[INFO] ");
			break;
		case Warning:
			append(L"[WARNING] ");
			break;
		case Error:
			append(L"[ERROR] ");
			break;
		}
	}

	const wchar_t* text() const { return c_str(); }
};

class LogCtrl : public CListCtrl
{
	DECLARE_DYNAMIC(LogCtrl)

public:
	LogCtrl();
	virtual ~LogCtrl();

protected:
	DECLARE_MESSAGE_MAP()
public:
	virtual void OnCustomdraw(NMHDR* pNMHDR, LRESULT* pResult);
};


